package com.study.design.pattern.pattern.behavioral.interpreter;

/**
 * @Author: gongsl
 * @Date: 2025-03-23 16:17
 * @description: 等于表达式
 */
public class EqualsExpression implements SQLExpression {
    private String field;
    private Object value;

    public EqualsExpression(String field, Object value) {
        this.field = field;
        this.value = value;
    }

    @Override
    public boolean interpret(SQLContext context) {
        return context.get(field).equals(value);
    }
}
